(function(){function h(){f(g.section).target.forEach(function(a){e.instances.has(a)||new e(a)})}var f=window.sg.common.$q,k=window.sg.common.utils.getCurrentDevice,l=window.BezierEasing,m=window.sg.common.utils.getNormalizedScrollLeft,n=window.sg.common.utils.setNormalizedScrollLeft,g={section:".tab-container",tabWrapper:".tab-container__wrapper",tabList:".tab-container__list",tabItems:".tab-container__item",tabButtons:"button.tab-container__title",tabPanel:".tab-container__panel"},e=function(a){this.ele= {section:f(a),tabWrapper:null,tabList:null,tabItems:null,tabButtons:null,tabPanel:null,tabItemsList:[],activeTabIndex:-1,activePanelIndex:-1,activePanelHistory:[]};this.setProperty();e.instances.set(a,this);this.init()};e.prototype.init=function(){this.bindEvents()};e.prototype.reInit=function(){this.init()};e.prototype.setProperty=function(){this.ele.tabWrapper=this.getValidTabArea(g.section,g.tabWrapper);this.ele.tabList=this.ele.tabWrapper?this.ele.tabWrapper.find(g.tabList):null;this.ele.tabItems= this.ele.tabWrapper?this.ele.tabWrapper.find(g.tabItems):null;this.ele.tabButtons=this.ele.tabWrapper?this.ele.tabWrapper.find(g.tabButtons):null;this.ele.tabPanel=this.getValidTabArea(g.section,g.tabPanel);this.isAnim=!1;this.setTabItemProperty()};e.prototype.getValidTabArea=function(a,d){var b=this;d=this.ele.section.find(d);d.target=d.target.filter(function(c){return f(c).closest(a).target[0]===b.ele.section.target[0]});return d};e.prototype.setTabItemProperty=function(){var a=this;this.ele.tabItems.target.forEach(function(d, b){a.ele.tabItemsList.push(d);a.ele.activePanelHistory.push(!1);d.classList.contains("is-active")&&(a.ele.activeTabIndex=b,a.ele.activePanelIndex=a.ele.tabItemsList.length-1,a.ele.activePanelHistory[a.ele.activePanelIndex]=!0)});this.ele.tabButtons.target.forEach(function(d,b){var c=a.ele.section.target[0].id+"_"+b;d.setAttribute("aria-controls",c);a.ele.tabPanel.target[b].setAttribute("id",c);a.ele.tabPanel.target[b].setAttribute("aria-labelledby",c)})};e.prototype.activateTab=function(a){-1!==this.ele.activeTabIndex&& (this.ele.tabItems.target[this.ele.activeTabIndex].classList.remove("is-active"),this.ele.tabItems.target[this.ele.activeTabIndex].querySelector(".tab-container__title").setAttribute("aria-selected","false"));this.ele.tabItems.target[a].classList.add("is-active");this.ele.tabItems.target[a].querySelector(".tab-container__title").setAttribute("aria-selected","true");this.ele.activeTabIndex=a};e.prototype.activatePanel=function(a){-1!==this.ele.activePanelIndex&&this.ele.tabPanel.target[this.ele.activePanelIndex].classList.remove("is-active"); this.ele.tabPanel.target[a].classList.add("is-active");this.ele.activePanelIndex=a;var d=[];window.sg.common.lazyLoad.setLazyLoad();var b=this.ele.tabPanel.target[a].querySelectorAll(".st-feature-benefit");if(0a[b].readyState?a[b].addEventListener("loadedmetadata",d(a[b])):(a[b].pause(),a[b].currentTime=0,a[b].play())};e.prototype.bindEvents=function(){var a=this;this.ele.tabList&&this.ele.tabList.target&&this.ele.tabList.target[0].addEventListener("click",function(d){for(var b=d.target;b&&"LI"!==b.nodeName;)b=b.parentNode;var c=a.ele.tabItems.target.indexOf(b);b=a.ele.tabItemsList.indexOf(b);-1e&&(a=e-d);0>d+a&&(a=-d);e=function(c){n(b.ele.tabList.target[0],d+a*c)};0c.right?d(a.right-c.right+e):a.left-e